<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>定区页面</title>
		<meta name="renderer" content="webkit">
  		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<!-- 项目基准路径 -->
		<base href="/bestinc/" />
		
		<!-- 引入layui的css -->
		<link rel="stylesheet" href="static/layui/css/layui.css"  media="all">
		
		<!-- 引入自定义工具css -->
		<link rel="stylesheet" href="static/css/util.css"  media="all">
		
		<!-- 引入jqeury -->
		<script src="static/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		
		<!-- 引入layui的js -->
		<script src="static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		
		<!-- 引入资源js -->
		<script src="static/js/base/riparea/riparea.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<!-- 头部搜索框 -->
		<div id="content">
		<div id="search-header">
		  <form class="layui-form">
		      <div class="layui-form-item">
		      	<div class="layui-inline">
		          <label class="layui-form-label">定区名</label>
		          <div class="layui-input-inline">
		            <input type="text" name="ripAreaName" id="ripAreaName" placeholder="请输入" autocomplete="off" class="layui-input">
		          </div>
		        </div>
		        <div class="layui-inline">
		          <label class="layui-form-label">负责人</label>
		          <div class="layui-input-inline">
		            <input type="text" name="staffName" id="staffName" placeholder="请输入" autocomplete="off" class="layui-input">
		          </div>
		        </div>
		        <div class="layui-inline">
		          <label class="layui-form-label">是否可用</label>
		          <div class="layui-input-inline">
		          	 <select name="useable" lay-filter="useable">
				        <option value=""></option>
				        <option value="Y">可用</option>
				        <option value="N">不可用</option>
				      </select>
		          </div>
		        </div>
		        <div class="layui-inline">
		          <label class="layui-form-label"></label>
		           <div class="layui-input-inline">
		            <button class="layui-btn" lay-submit="" lay-filter="ripareaSearchBtn" id="ripareaSearchBtn">
		            	<i class="layui-icon layui-icon-search"></i>
		            	查询
		            </button>
		            <button class="layui-btn" type="reset">
		            	<i class="layui-icon layui-icon-refresh"></i>
		            	重置
		            </button>
		          </div>
		        </div>
		      </div>
	      </form>
	    </div>
		<!-- 数据表格 -->
		<div id="dataDiv">
		 <table class="layui-hide" id="ripareaTable"  lay-filter="ripareaTableEvent">
		
		 </table>
		</div>
		<!-- 添加模态框 -->
		<div id="addRipareaModal" class="definedModal">
			<!-- 这里手动加表单样式 -->
			<form id="addRipareaForm" lay-filter="addRipareaForm" class="layui-form" action="">
			  <div class="layui-form-item">
			    <label class="layui-form-label">定区名</label>
			    <div class="layui-input-block">
			      <input type="text" name="ripAreaName" lay-verify="required" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  <div class="layui-form-item">
				    <label class="layui-form-label">请选择</label>
				    <div class="layui-input-block">
				      <select name="staffName" id ="staffName" lay-filter="staffName" lay-verify="" lay-search>
					  </select>  
				    </div>
				</div>
			  <!-- <div class="layui-form-item">
			    <label class="layui-form-label">负责人</label>
			    <div class="layui-input-block">
			      <input type="text" name="staffName" lay-verify="required" autocomplete="off" class="layui-input">
			    </div>
			  </div> -->
			  <div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">描述</label>
			    <div class="layui-input-block">
			      <textarea name="description" placeholder="请输入内容" class="layui-textarea"></textarea>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-input-block">
			      <button type="submit" class="layui-btn" lay-submit="" lay-filter="addRipareaBtn">立即提交</button>
			      <button type="button" class="layui-btn modalClose">关闭</button>
			    </div>
			  </div>
			</form>
		</div>
		
		<!-- 修改模态框 -->
		<div id="updateRipareaModal" class="definedModal">
			<!-- 这里手动加表单样式 -->
			<form id="updateRipareaForm" lay-filter="updateRipareaForm" class="layui-form" action="">
			<input type="hidden" id="_method" name="_method" />
			<input type="hidden" id="ripAreaId" name="ripAreaId" />
			  <div class="layui-form-item">
			    <label class="layui-form-label">定区名</label>
			    <div class="layui-input-block">
			      <input type="text" name="ripAreaName" lay-verify="required" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">负责人</label>
			    <div class="layui-input-block">
			      <input type="text" name="staffName" lay-verify="required" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  
			  <div class="layui-form-item">
			    <label class="layui-form-label">是否可用</label>
			    <div class="layui-input-block">
			      <input type="text" name="useable" disabled="disabled" lay-verify="required" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  
			  <div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">描述</label>
			    <div class="layui-input-block">
			      <textarea name="description" placeholder="请输入内容" class="layui-textarea"></textarea>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-input-block">
			      <button type="submit" class="layui-btn" lay-submit="" lay-filter="updateRipareaBtn">立即提交</button>
			      <button type="button" class="layui-btn modalClose">关闭</button>
			    </div>
			  </div>
			</form>
		</div>
		
		<!-- 分配取派员模态框 -->
		<div id="assignDispatchersModal" class="definedModal">
			<!-- 这里手动加表单样式 -->
			<form id="assignDispatchersForm" lay-filter="assignDispatchersForm" class="layui-form" action="">
				<input type="hidden" id="ripAreaId" name="ripAreaId" />
				<table class="layui-table" id="tb" style="width: 400px;margin: auto;">
				  <colgroup>
				    <col width="200">
				    <col>
				  </colgroup>
				  <thead>
				    <tr>
				      <th>定区名</th>
				      <th>负责人</th>
				    </tr> 
				  </thead>
				  <tbody>
				  </tbody>
				</table>
				<!-- 穿梭框 -->
				<div id="aipAreaStaffFransfer" class="demo-transfer" style="margin: 50px 20px 0px 109px;">
					
				</div>
			</form>
		</div>
		
		<!-- 定区客户模态框 -->
		<div id="areaCustomerModal" class="definedModal">
			<!-- 这里手动加表单样式 -->
			<form id="areaCustomerForm" lay-filter="areaCustomerForm" class="layui-form" action="">
				<input type="hidden" id="ripAreaId" name="ripAreaId" />
				<table class="layui-table" id="tb" style="width: 400px;margin: auto;">
				  <colgroup>
				    <col width="200">
				    <col>
				  </colgroup>
				  <thead>
				    <tr>
				      <th>定区名</th>
				      <th>负责人</th>
				    </tr> 
				  </thead>
				  <tbody>
				  </tbody>
				</table>
				<!-- 穿梭框 -->
				<div id="areaCustomerFransfer" class="demo-transfer" style="margin: 50px 20px 0px 109px;">
					
				</div>
			</form>
		</div>
		
		<!--  -->
	    <!-- 头部工具栏 -->
		<script type="text/html" id="ripareaToolbar">
  			<div class="layui-btn-group">
				<button lay-event="addRiparea" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe654;</i>添加</button>
				<button lay-event="updateRiparea" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe642</i>修改</button>
    			<button lay-event="removeRiparea" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe702;</i>禁用</button>
				<button lay-event="restoreRiparea" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe666;</i>恢复</button>
				<button lay-event="assignDispatchers" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon"></i>分配取派员</button>
				<button lay-event="areaCustomer" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon"></i>分配客户</button>
  			</div>
		</script>
		
		<!-- 状态 -->
		<script type="text/html" id="checkboxTpl">
    		<input type="checkbox" lay-filter="areable" value="{{d.subareaId}}" lay-skin="switch" lay-text="冻结|还原" {{d.useable=='Y'?'checked':''}}/>
		</script>
		
		<!-- 工具栏列 -->
		<!--<script type="text/html" id="resourceBar">
  			<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  			<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
		</script> -->
		</div>
	</body>
</html>
